package com.traveling.hztraveling.controller;

import com.traveling.hztraveling.entity.po.HzUser;
import com.traveling.hztraveling.entity.vo.Result;
import com.traveling.hztraveling.service.IHzUserService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/register")
@RequiredArgsConstructor
@Slf4j
 @Api(tags = "用户注册接口")
public class RegisterController {

    private final IHzUserService hzUserService;

    @PostMapping()
    public Result<HzUser> register(@RequestBody HzUser hzUser) {
        return hzUserService.register(hzUser);
    }

}
